﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="FTradeReceivablesTuiJi2.aspx.cs" Inherits="IHISCETeim.Web.MachineSys.FTradeModel.FTradeReceivablesTuiJi2" %>
<%--退机操作2--%>
<script type="text/javascript">

    $(document).ready(function () {

        $("#FTradeReceivablesHuanJi_Price,#FTradeReceivablesHuanJi_GPSFeiYong,#FTradeReceivablesHuanJi_YueCuXiaoJinE").change(function () {
            changeOldHeTongJinE()
        })
        function changeOldHeTongJinE() {
            //处理合同金额
            if ($(this).val() == "")
                $(this).val(0);
            var Price = parseFloat($("#FTradeReceivablesHuanJi_Price").val());
            var GPSFeiYong = parseFloat($("#FTradeReceivablesHuanJi_GPSFeiYong").val());
            var YueCuXiaoJinE = parseFloat($("#FTradeReceivablesHuanJi_YueCuXiaoJinE").val());

            $("#FTradeReceivablesHuanJi_HeTongJinE").val( Price + GPSFeiYong + YueCuXiaoJinE);
        }       

        changeOldHeTongJinE();


        $("#FTradeReceivablesTuiJi_Price,#FTradeReceivablesTuiJi_GPSFeiYong,#FTradeReceivablesTuiJi_YueCuXiaoJinE").change(function () {
            changeHHeTongJinE()
        })
        function changeHHeTongJinE() {
            //处理合同金额
            if ($(this).val() == "")
                $(this).val(0);
            var Price = parseFloat($("#FTradeReceivablesTuiJi_Price").val());
            var GPSFeiYong = parseFloat($("#FTradeReceivablesTuiJi_GPSFeiYong").val());
            var YueCuXiaoJinE = parseFloat($("#FTradeReceivablesTuiJi_YueCuXiaoJinE").val());

            $("#FTradeReceivablesTuiJi_HeTongJinE").val((-1) * Price + GPSFeiYong + YueCuXiaoJinE);
        }
        $("#FTradeReceivablesTuiJi_GPSFeiYong").val((-1) * parseFloat($("#FTradeReceivablesTuiJi_GPSFeiYong").val()));
        $("#FTradeReceivablesTuiJi_YueCuXiaoJinE").val((-1) * parseFloat($("#FTradeReceivablesTuiJi_YueCuXiaoJinE").val()))

        changeHHeTongJinE();
    })
    function validateCallbackFTradeReceivablesTuiJi(form, callback) {

        var $form = $(form);
        $("#FTradeReceivablesTuiJi_BtnSave").find("button").attr("disabled", "disabled").html("退机中......");
        setTimeout(function () { $("#FTradeReceivablesTuiJi_BtnSave").find("button").removeAttr("disabled").html(" 退 机 "); }, 20000);

        return validateCallback(form, callback);
    }
</script>
<div class="pageContent">
	<form  method="post" action="FTradeModel/FTradeReceivablesTuiJi2.aspx?ajaxmethod=add&FTradeID=<%=FTradeID %>" class="pageForm required-validate" onsubmit="return validateCallbackFTradeReceivablesTuiJi(this, navTabAjaxDone);" >
		<div class="pageFormContent" layoutH="56">
            <h2 style="clear:both; padding:5px; border-bottom:1px solid #B8D0D6; margin-bottom:5px; ">
                ==><a href="#" onclick="$('#FTradeReceivablesTuiJi_Remark').toggle()">退机说明:</a>
            </h2>
            <div id="FTradeReceivablesTuiJi_Remark" style=" line-height:23px;clear:both; padding:5px; border:1px solid #B8D0D6;margin-bottom:5px; display:none; ">
                1.系统自动对此合同<b>[<%=obj.HeTongHao%>]</b>的已冲帐记录进行收回,并自动创建一条收款记录,退机后将转向冲帐界面进行冲帐.<br />
                2.必需手工修改以下退机信息(默认信息与原信息一致).<br/>
                3.如果此合同没有冲过帐，则退机后，不会转向冲帐界面.                
            </div>
            <div style="clear:both;"></div>
             <h2 style=" padding:5px 0px 5px 6px; border-bottom:1px solid #B8D0D6;">
                ==><a href="#"  onclick="$('#FTradeReceivablesTuiJi_OldHeTong').toggle()">原机器信息(生成负记录） </a>
             </h2>
                <div id="FTradeReceivablesTuiJi_OldHeTong" style="">
			    <p>
				<label>合 同 号：</label>
				<input name="HeTongHao_Fu" type="text" id="FTradeReceivablesHuanJi_HeTongHao" class="" readonly value="<%=obj.HeTongHao %>" />
			    </p>
			    <p>
				    <label>销售时间：</label>
				    <input name="XiaoShouShiJian_Fu" class="required" readonly type="text" value="<%=obj.XiaoShouShiJian.ToString("yyyy-MM-dd") %>"   alt=""  />
			    </p>
			    <p>
				    <label>经 销 商：</label>
                    <input name="JingXiaoShang_Fu" type="text" value="<%=obj.JingXiaoShang %>"  class="required textInput "  readonly/>
			    </p>
                <p>
				    <label>营业经理：</label>
				    <input name="YingYeJingLi_Fu" class="" type="text" readonly  value="<%=obj.YingYeJingLi %>" alt="请输入营业经理" />
			    </p>
                <div class="divider"></div>
			    <p>
				    <label>型    号：</label>
                    <input name="XingHao_Fu" class="" type="text"  value="<%=obj.XingHao %>" readonly/>
			    </p>
                <p>
				    <label>机    号：</label>
				    <input name="JiHao_Fu" class="" type="text" size="" alt=""  value="<%=obj.JiHao %>" readonly />
			    </p>
                <div class="divider"></div>
			    <p>
				    <label>单    价：</label>
				    <input id="FTradeReceivablesHuanJi_Price" name="Price_Fu" class=" inputFloat" type="text" value="<%=obj.Price %>" size="" alt="" readonly />
                    <span class="unit">元</span>
			    </p>
                <p>
				    <label>GPS费 用：</label>
				    <input id="FTradeReceivablesHuanJi_GPSFeiYong" name="GPSFeiYong_Fu" class=" inputFloat" type="text" value="<%=obj.GPSFeiYong %>" size="" alt=""  readonly/>
                    <span class="unit">元</span>
			    </p>
                 <p>
				        <label>GPS 号：</label>
				        <input name="" class="" type="text" value="<%=obj.GPSNum %>" size="" alt="" readonly/>
			     </p>
                 <p>
				        <label>利息收入：</label>
				        <input  name="InterestIncome_Fu" class="required inputFloat" type="text" value="<%=obj.InterestIncome %>" size="" alt="" readonly />
                        <span class="unit">元</span>
		        </p>
                <div style="clear:both;"></div>   
                <p style=" background:RED;">
				    <label>月促销折让金额：</label>
                    <input id="FTradeReceivablesHuanJi_YueCuXiaoJinE" name="YueCuXiaoJinE_Fu" class=" inputFloat" type="text" value="<%=obj.YueCuXiaoJinE %>" size="" alt="" max="0" min="<%=obj.YueCuXiaoJinE  %>"  />
                    <span class="unit">元</span>
			    </p>
                 <p style=" background:RED;">
				    <label>到期日期：</label>
                    <input name="DaoQi_Fu" class="date" type="text" value="" size="" alt=""   />
                    <span class="unit"></span>
			    </p>

                <div style="clear:both;"></div> 
                
                <div class="divider"></div>
			    <p>
				    <label>合同金额：</label>
				    <input id="FTradeReceivablesHuanJi_HeTongJinE" name="HeTongJinE_Fu" class=" inputFloat" type="text" readonly   value="<%=obj.HeTongJinE %>"  size="" alt=""/>
                    <span class="unit">元</span>
			    </p>              
                <div style="clear:both;"></div>            
				<label>合同付款条款：</label>
				<textarea name="FuKuanTiaoKuan_Fu" cols="80" rows="4" readonly  ><%=obj.FuKuanTiaoKuan%></textarea>
                </div>
           
              
                <div style="clear:both;margin-bottom: 5px;"></div>
                <h2 style=" padding:5px 0px 5px 6px; border-bottom:1px solid #B8D0D6;">退机信息 【<a href="FTradeModel/FTradeReceivablesView.aspx?FTradeID=<%=FTradeID %>" target="navTab" title="查看数据源" rel="FTradeReceivablesView" style=" font-weight:normal!important; color:Red;" >点击</a>】可查看原合同的详细信息</h2>
			    <p>
				<label>合 同 号：</label>
				<input name="HeTongHao" type="text" id="FTradeReceivablesTuiJi_HeTongHao" class="required" readonly value="<%=obj.HeTongHao %>" />
			    </p>
			    <p>
				    <label>退机时间：</label>
				    <input name="XiaoShouShiJian" class="required date" type="text" value=""  alt=""  />
			    </p>
			    <p>
				    <label>经 销 商：</label>
                    <input name="JingXiaoShang" type="text" value="<%=obj.JingXiaoShang %>"  class="required textInput "  readonly/>
			    </p>
                <p>
				    <label>营业经理：</label>
				    <input name="YingYeJingLi" class="required" type="text"  value="<%=obj.YingYeJingLi %>" alt="请输入营业经理" />
			    </p>
                <div class="divider"></div>
			    <p>
				    <label>型    号：</label>
                    <input name="XingHao" class="required" type="text"  value="<%=obj.XingHao %>" readonly/>
			    </p>
                <p>
				    <label>机    号：</label>
				    <input name="JiHao" class="required" type="text" size="" alt=""  value="<%=obj.JiHao %>" readonly />
			    </p>
                <div class="divider"></div>
			    <p>
				    <label>单    价：</label>
				    <input id="FTradeReceivablesTuiJi_Price" name="Price" class="required inputFloat" type="text" value="<%=obj.Price %>" size="" alt="" />
                    <span class="unit">元</span>
			    </p>
                <p>
				    <label>GPS费 用：</label>
				    <input id="FTradeReceivablesTuiJi_GPSFeiYong" name="GPSFeiYong" class="required inputFloat" type="text" value="<%=obj.GPSFeiYong %>" size="" alt="" />
                    <span class="unit">元</span>
			    </p>
                <p>
				    <label>月促销折让金额：</label>
                    <input id="FTradeReceivablesTuiJi_YueCuXiaoJinE" name="YueCuXiaoJinE" class="required inputFloat" type="text" value="<%=obj.YueCuXiaoJinE %>" size="" alt="" />
                    <span class="unit">元</span>
			    </p>
                 <p>
				        <label>GPS 号：</label>
				        <input name="GPSNum" class="" type="text" value="<%=obj.GPSNum %>" size="" alt="" readonly/>
			        </p> 
                <p>
				        <label>利息收入：</label>
				        <input  name="InterestIncome" class="required inputFloat" type="text" value="<%=obj.InterestIncome %>" size="" alt=""  readonly />
                        <span class="unit">元</span>
		        </p>    
                <div class="divider"></div>
			    <p>
				    <label>合同金额：</label>
				    <input id="FTradeReceivablesTuiJi_HeTongJinE" name="HeTongJinE" class="required inputFloat" type="text"   value="<%=obj.HeTongJinE %>"  size="" alt=""/>
                    <span class="unit">元</span>
			    </p>
              
                <div style="clear:both;"></div>
            
				<label>合同付款条款：</label>
				<textarea name="FuKuanTiaoKuan" cols="80" rows="4"  ><%=obj.FuKuanTiaoKuan%></textarea>
                <div style="clear:both;"></div>
                <p>
			        <label>已收款项：</label>
			        <input name="YiShouKuanXiang" class="" type="text" readonly value="<%=obj.YiShouKuanXiang %>"　readonly />
		        </p>
                <p>
			        <label>未收款项：</label>
			        <input name="WeiShouKuanXiang" class="" type="text" readonly value="<%=obj.WeiShouKuanXiang %>"　readonly />
		        </p>
                <p>
			        <label>逾期款项：</label>
			        <input name="YuQiKuanXiang" class="" type="text" readonly value="<%=obj.YuQiKuanXiang %>"  alt=""/>
		        </p>
               <div style="clear:both;margin-bottom: 5px;"></div>

        </div>
		<div class="formBar">
			<ul>
				
				<li ><div id="FTradeReceivablesTuiJi_BtnSave" class="buttonActive"><div class="buttonContent"><button type="submit"  >退机</button></div></div></li>
				<li>
					<div class="button"><div class="buttonContent"><button type="button" class="close">取消</button></div></div>
				</li>
			</ul>
		</div>
	</form>
</div>